package tester;

import registerCenter.RegisterCenter;

public class RegisterCenterTest {
	RegisterCenter rg=RegisterCenter.getInstance();
	public void instenceTest(){
		RegisterCenter rg2=RegisterCenter.getInstance();
		if(rg.equals(rg2)){
			System.out.println("singleton model ok!");
		}else
			System.out.println("singleton model wrong!");
	}
	public void regist(){
		String serviceName = "sayhello";
		String serviceURI = "http://sayHelloService";
		String serviceAddress = "http://localhost:8088/SayHelloService/wsdl/SayHello.wsdl";
		String mappath = "src/dataMap/sayHelloMap.xml";
		rg.regist(serviceName, serviceURI, serviceAddress, null, mappath);
		
		System.out.println(rg.getMapPath(serviceURI));
		System.out.println(rg.getStubPath(serviceURI));
		System.out.println(rg.getStubPort(serviceURI));
	}
	public void unregist(){
		rg.unregister("http://sayHelloService");
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		RegisterCenterTest t=new RegisterCenterTest();
		t.regist();
	}

}
